package com.yss.sofa.report.engine.series;

import java.util.ArrayList;
import java.util.List;

import com.yss.sofa.report.engine.Const;

public class BarLineSeries extends DataSetSeries{
	private static final long serialVersionUID = -6434903437299212920L;
	private String category;
	private String barItem;
	private String lineItem;
	private String barValue;
	private String lineValue;
	private String categoryAxisLabel;
	private String barValueAxisLabel;
	private String lineValueAxisLabel;
	private boolean gridline;
	private double maxBarWidth;
	private float lineWidth;
	private boolean shape;
	private boolean outline;
	private int tickX;
	private boolean legend;
	private int legendPosition;//0=bottom,1=right;2=top,3=left;
	private List<String> barColors=new ArrayList<String>();
	private List<String> lineColors=new ArrayList<String>();
	private boolean antialias;
	private boolean ignoreEmptyCategory;
	private boolean ignoreEmptyBarItem;
	private boolean ignoreEmptyLineItem;
	private boolean ignoreEmptyBarValue;
	private boolean ignoreEmptyLineValue;
	private boolean horizontal;
	protected BarLineSeries(int type) {
		super(type);
		this.category=Const.NONE;
		this.barItem=Const.NONE;
		this.lineItem=Const.NONE;
		this.barValue=Const.NONE;
		this.lineValue=Const.NONE;
		this.categoryAxisLabel=null;
		this.barValueAxisLabel=null;
		this.lineValueAxisLabel=null;
		this.gridline=false;
		this.outline=false;
		this.maxBarWidth=0.1;
		this.lineWidth=1.5f;
		this.shape=true;
		this.tickX=0;
		this.antialias=true;
		this.legend=true;
		this.legendPosition=0;
		this.ignoreEmptyCategory=false;
		this.ignoreEmptyBarItem=false;
		this.ignoreEmptyLineItem=false;
		this.ignoreEmptyBarValue=false;
		this.ignoreEmptyLineValue=false;
		this.horizontal=false;
	}
	public BarLineSeries(){
		this(TYPE_BAR_LINE);
	}
	@Override
	public void assignTo(Series series){
		BarLineSeries _=(BarLineSeries)series;
		super.assignTo(_);
		_.category=this.category;
		_.barItem=this.barItem;
		_.lineItem=this.lineItem;
		_.barValue=this.barValue;
		_.lineValue=this.lineValue;
		_.categoryAxisLabel=this.categoryAxisLabel;
		_.barValueAxisLabel=this.barValueAxisLabel;
		_.lineValueAxisLabel=this.lineValueAxisLabel;
		_.gridline=this.gridline;
		_.outline=this.outline;
		_.maxBarWidth=this.maxBarWidth;
		_.lineWidth=this.lineWidth;
		_.shape=this.shape;
		_.tickX=this.tickX;
		_.antialias=this.antialias;
		_.legend=this.legend;
		_.legendPosition=this.legendPosition;
		_.ignoreEmptyCategory=this.ignoreEmptyCategory;
		_.ignoreEmptyBarItem=this.ignoreEmptyBarItem;
		_.ignoreEmptyLineItem=this.ignoreEmptyLineItem;
		_.ignoreEmptyBarValue=this.ignoreEmptyBarValue;
		_.ignoreEmptyLineValue=this.ignoreEmptyLineValue;
		_.horizontal=this.horizontal;
		_.barColors.clear();
		_.barColors.addAll(this.barColors);
		_.lineColors.clear();
		_.lineColors.addAll(this.lineColors);
	}
	@Override
	public Series create() {
		BarLineSeries _=new BarLineSeries();
		this.assignTo(_);
		return _;
	}
	public String getCategory() {
		return category;
	}
	public String getBarItem() {
		return barItem;
	}
	public String getLineItem() {
		return lineItem;
	}
	public String getBarValue() {
		return barValue;
	}
	public String getLineValue() {
		return lineValue;
	}
	public String getCategoryAxisLabel() {
		return categoryAxisLabel;
	}
	public String getBarValueAxisLabel() {
		return barValueAxisLabel;
	}
	public String getLineValueAxisLabel() {
		return lineValueAxisLabel;
	}
	public boolean isGridline() {
		return gridline;
	}
	public double getMaxBarWidth() {
		return maxBarWidth;
	}
	public float getLineWidth() {
		return lineWidth;
	}
	public boolean isShape() {
		return shape;
	}
	public boolean isOutline() {
		return outline;
	}
	public int getTickX() {
		return tickX;
	}
	public boolean isLegend() {
		return legend;
	}
	public int getLegendPosition() {
		return legendPosition;
	}
	public List<String> getBarColors() {
		return barColors;
	}
	public List<String> getLineColors() {
		return lineColors;
	}
	public boolean isAntialias() {
		return antialias;
	}
	public boolean isIgnoreEmptyCategory() {
		return ignoreEmptyCategory;
	}
	public boolean isIgnoreEmptyBarItem() {
		return ignoreEmptyBarItem;
	}
	public boolean isIgnoreEmptyLineItem() {
		return ignoreEmptyLineItem;
	}
	public boolean isIgnoreEmptyBarValue() {
		return ignoreEmptyBarValue;
	}
	public boolean isIgnoreEmptyLineValue() {
		return ignoreEmptyLineValue;
	}
	public boolean isHorizontal() {
		return horizontal;
	}
}
